import request from '@/utils/request'

const hospitalSetApi = '/admin/hosp/hospitalSet';
export default {
    //带条件带分页的查询医院设置列表
    getHospitalSetByPageByCondition(currentNum,limit,searchObj){
        return request({
            url: `${hospitalSetApi}/getByPageAndCondition/${currentNum}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    //根据id删除医院设置列表
    deleteHospitalSetById(id){
        return request({
            url:`${hospitalSetApi}/delById/${id}`,
            method: 'delete'
        })
    },
    //新增医院设置
    saveHospitalSet(hospitalSet){
        return request({
            url:`${hospitalSetApi}/save`,
            method: 'post',
            data: hospitalSet
        })
    },
    //根据id回显医院设置
    getHospitalSetById(id){
        return request({
            url:`${hospitalSetApi}/getById/${id}`,
            method: 'get'
        })
    },
    //更新医院设置
    updateHospitalSet(hospitalSet){
        return request({
            url:`${hospitalSetApi}/updateById`,
            method: 'post',
            data: hospitalSet
        })
    },
    removeRows(ids){
        return request({
            url:`${hopitalSetApi}/deleteByIds`,
            method:'delete',
            data: ids
        })
    },
    lockOrUnlock(id,status){
        return request({
            url:`${hospitalSetApi}/lockOrUnlockHospitalSet/${id}/${status}`,
            method:'put'
        })
    }
}